﻿using System;
using System.Runtime.Serialization;
using NCMIS.ObjectModel.MetaData;

namespace NCMIS.Produce
{
    /// <summary>
    /// Represents a CMIS Query.
    /// </summary>
    [DataContract(Name = "query", Namespace = CmisNs.Cmis)]
    public class Query
    {
        [DataMember(Name = "repositoryId")]
        public string RepositoryId
        {
            get;
            set;
        }

        [DataMember(Name = "statement")]
        public string Statement
        {
            get;
            set;
        }

        [DataMember(Name = "searchAllVersions")]
        public bool SearchAllVersions
        {
            get;
            set;
        }

        [IgnoreDataMember]
        public bool SearchAllVersionsSpecified
        {
            get;
            set;
        }

        [DataMember(Name = "includeAllowableActions")]
        public bool IncludeAllowableActions
        {
            get;
            set;
        }

        [IgnoreDataMember]
        public bool IncludeAllowableActionsSpecified
        {
            get;
            set;
        }

        [DataMember(Name = "includeRelationships")]
        public IncludeRelationships IncludeRelationships
        {
            get;
            set;
        }

        [IgnoreDataMember]
        public bool IncludeRelationshipsSpecified
        {
            get;
            set;
        }

        [DataMember(Name = "renditionFilter")]
        public string RenditionFilter
        {
            get;
            set;
        }

        [DataMember(Name = "maxItems")]
        public string maxItems
        {
            get;
            set;
        }

        [DataMember(Name = "skipCount")]
        public string SkipCount
        {
            get;
            set;
        }
    }
}
